package exception_;

/**
 * @Author 小闽
 * @Date 2024/9/22 22:11
 * @PackageName: exception_
 * @ClassName: ExceptionExercise01
 * @Description: 异常练习
 * @Version 1.0
 */
public class ExceptionExercise01 {
    public static void main(String[] args) {
        // 定义一个字符串数组
        String friends[] = {"tom","jack","milan"};
        // 循环遍历数组中的数据，这里会出现数组下标越界异常
        for (int i = 0; i < 4; i++) {
            System.out.println(friends[i]);
        }
    }
}
